<?php
/**
 * Description of _select_data
 * 
 * @author Dung.Hoang
 * @since 24-03-2014 - 15:28:13
 */
?>
<link rel="stylesheet" href="<?php echo $this->asset ?>/css/chosen.css" media="screen"  />
<script src="<?php echo $this->asset ?>/js/chosen.jquery.min.js"></script>
<select data-placeholder="Choose a menu..." class="chosen-select span10" name="MenuItem[value]" onchange="fillName();">
    <?php foreach ($data as $id => $data): ?>
        <?php
        if (is_array($data))
        {
            $title = $data['text'];
            $name  = $data['name'];
        }
        else
        {
            $title = $name  = $data;
        }
        ?>
        <option value="<?php echo $id ?>" 
                <?php echo $id == @$menu->value ? 'selected=""' : '' ?> menu_name="<?php echo @$name ?>">
                    <?php echo $title ?>
        </option>
    <?php endforeach; ?>
</select>